package com.simple;

/**
 * @author daxue0929
 * @date 2023/3/2
 */

public class Test {
    public static void main(String[] args) {
        Student student = new Student();
        Student newStudent = student.clone();
    }
}

class Student implements Cloneable {
    public Student() {}
    @Override
    public Student clone() {
        try {
            Student clone = (Student) super.clone();
            // TODO: copy mutable state here,
            //       so the clone can't change the internals of the original
            return clone;
        } catch (CloneNotSupportedException e) {
            throw new AssertionError();
        }
    }
}
